1. Technical Field
The present invention relates generally to an improved data processing system and in particular to an improved method and apparatus for generating interrupts in a data processing system. Still more particularly, the present invention provides a method and apparatus for generating input/output interrupts in a data processing system.
2. Description of the Related Art
In a data processing system, such as a workstation or personal computer, a network adapter is often present as an interface device that is located between a network and the input/output (I/O) bus of a workstation or personal computer to be connected to the network. Data packets flow through the adapter in both directions and the adapter forms functions, such as making sure that packets do not get lost and processing data packets received from the network are to be transmitted onto the network. In processing data packets received from the network, the adapter will generate an interrupt that is sent to the host processor to indicate that a data packet has been received and requires processing. An "interrupt" is an adapter's request for attention from the processor. When the processor receives an interrupt, it suspends its current operations, saves the status of its work, and transfers control to a special routine known as an interrupt handler or interrupt service routine (ISR), which contains the instructions for dealing with the particular situation that caused the interrupt. Interrupts can be generated by various hardware devices to request service or report problems, or by the processor itself in response to program errors or requests for operating-system services. Interrupts are the processor's way of communicating with the active elements that make up a computer system.
In processing an interrupt, overhead is present which may reduce the processing efficiency of the data processing system. I/O interrupt processing overhead typically includes (1) saving the application's current state, (2) executing the I/O interrupt service routine (ISR) and then (3) restoring the application's state so execution can continue from where it was interrupted. Interrupt service routine is a special routine that is executed when a specific interrupt occurs. Interrupts from different sources have different interrupt service routines to carry out processes to handle the interrupt. These interrupt service routines may include, for example, updating a system clock, reading the keyboard, or processing a data packet received by an adapter. The occurrence of multiple I/O interrupts increases the amount of overhead used to process these interrupts. This situation may decrease the efficiency of the data processing system, especially when many interrupts occur frequently.
Therefore, it would be advantageous to have an improved method and apparatus for generating interrupts.